package string.nowcoder.easy;

import java.util.Scanner;

/**
 * @author bruin_du
 * @description 剪花布条
 * @date 2022/6/2 15:25
 **/
public class CutCloth {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while(in.hasNext()){
            String str1 = in.next();
            String str2 = in.next();
            char[] cloth = str1.toCharArray();
            char[] target = str2.toCharArray();
            int count = 0;
            for (int i = 0; i < cloth.length - target.length + 1; i++) {
                char chC = cloth[i];
                if(chC == target[0]){
                    int tmpI = i,j = 0;
                    for (; j < target.length; j++) {
                        if(target[j] != cloth[tmpI]){
                            break;
                        }
                        tmpI++;
                    }
                    if(j == target.length){
                        count++;
                        i += target.length - 1;
                    }
                }

            }
            System.out.println(count);
        }
    }
}
